#include"Sort.h"

void TestBubbleSort()
{
	int a[] = { 5,8,4,9,3,6,2,7,1,0 };
	PrintArray(a, sizeof(a) / sizeof(int));
	BubbleSort(a, sizeof(a) / sizeof(int));
	PrintArray(a, sizeof(a) / sizeof(int));
	printf("\n");
}

void TestInsertSort()
{
	int a[] = { 5,8,4,9,3,6,2,7,1,0 };
	PrintArray(a, sizeof(a) / sizeof(int));
	InsertSort(a, sizeof(a) / sizeof(int));
	PrintArray(a, sizeof(a) / sizeof(int));
	printf("\n");
}

void TestShellSort()
{
	int a[] = { 5,8,4,9,3,6,2,7,1,0 };
	PrintArray(a, sizeof(a) / sizeof(int));
	ShellSort(a, sizeof(a) / sizeof(int));
	PrintArray(a, sizeof(a) / sizeof(int));
	printf("\n");
}

void TestHeapSort()
{
	int a[] = { 5,8,4,9,3,6,2,7,1,0 };
	PrintArray(a, sizeof(a) / sizeof(int));
	HeapSort(a, sizeof(a) / sizeof(int));
	PrintArray(a, sizeof(a) / sizeof(int));
	printf("\n");
}

void TestSelectSort()
{
	int a[] = { 5,8,4,9,3,6,2,7,1,0 };
	PrintArray(a, sizeof(a) / sizeof(int));
	SelectSort(a, sizeof(a) / sizeof(int));
	PrintArray(a, sizeof(a) / sizeof(int));
	printf("\n");
}

void TestQuickSort()
{
	int a[] = { 5,8,4,9,3,6,2,7,1,0 };
	PrintArray(a, sizeof(a) / sizeof(int));
	QuickSort(a, 0, sizeof(a) / sizeof(int)-1);
	PrintArray(a, sizeof(a) / sizeof(int));
	printf("\n");
}

void TestMergeSort()
{
	int a[] = { 5,8,4,9,3,6,2,7,1,0 };
	PrintArray(a, sizeof(a) / sizeof(int));
	MergeSort(a, sizeof(a) / sizeof(int));
	PrintArray(a, sizeof(a) / sizeof(int));
	printf("\n");
}

void TestCountSort()
{
	int a[] = { 5,8,4,9,3,6,2,7,1,0 };
	PrintArray(a, sizeof(a) / sizeof(int));
	CountSort(a, sizeof(a) / sizeof(int));
	PrintArray(a, sizeof(a) / sizeof(int));
	printf("\n");
}

int main()
{
	TestBubbleSort();
	TestInsertSort();
	TestShellSort();
	TestHeapSort();
	TestSelectSort();
	TestQuickSort();
	TestMergeSort();
	TestCountSort();

	return 0;
}